home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / System Extras Headers / AOCE Headers / OCEMail.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-20  |  55.4 KB  |  1,979 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        OCEMail.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __OCEMAIL__
  13. #define __OCEMAIL__
  14.  
  15. #ifndef __DIGITALSIGNATURE__
  16. #include "DigitalSignature.h"
  17. /*    #include <Files.h>                                            */
  18. /*        #include <Types.h>                                        */
  19. /*            #include <ConditionalMacros.h>                        */
  20. /*            #include <MixedMode.h>                                */
  21. /*                #include <Traps.h>                                */
  22. /*        #include <OSUtils.h>                                    */
  23. /*        #include <SegLoad.h>                                    */
  24. /*    #include <Memory.h>                                            */
  25. #endif
  26.  
  27. #ifndef __FILES__
  28. #endif
  29.  
  30. #ifndef __MEMORY__
  31. #endif
  32.  
  33. #ifndef __OCE__
  34. #include "OCE.h"
  35. /*    #include <Aliases.h>                                        */
  36. /*        #include <AppleTalk.h>                                    */
  37. /*    #include <AppleEvents.h>                                    */
  38. /*        #include <Events.h>                                        */
  39. /*            #include <Quickdraw.h>                                */
  40. /*                #include <QuickdrawText.h>                        */
  41. /*                    #include <IntlResources.h>                    */
  42. /*        #include <EPPC.h>                                        */
  43. /*            #include <PPCToolBox.h>                                */
  44. /*            #include <Processes.h>                                */
  45. /*        #include <Notification.h>                                */
  46. /*    #include <Script.h>                                            */
  47. #endif
  48.  
  49. #ifndef __OCEAUTHDIR__
  50. #include "OCEAuthDir.h"
  51. #endif
  52.  
  53. #ifndef __OCEMESSAGING__
  54. #include "OCEMessaging.h"
  55. #endif
  56.  
  57. #ifndef __TEXTEDIT__
  58. #include <TextEdit.h>
  59. #endif
  60.  
  61. #ifndef __TYPES__
  62. #endif
  63.  
  64. /**************************************************************************************/
  65. /* Common Definitions */
  66. /**************************************************************************************/
  67.  
  68. typedef union MSAMParam MSAMParam;
  69.  
  70. /*
  71.     MSAMIOCompletionProcs cannot be written in or called from a high-level 
  72.     language without the help of mixed mode or assembly glue because they 
  73.     use the following parameter-passing convention:
  74.  
  75.     typedef pascal void (*MSAMIOCompletionProcPtr)(MSAMParam* paramBlock);
  76.  
  77.         In:
  78.             =>     paramBlock                A0.L
  79.         Out:
  80.             none
  81. */
  82.  
  83. enum  {
  84.     uppMSAMIOCompletionProcInfo        = kRegisterBased|REGISTER_ROUTINE_PARAMETER(1,kRegisterA0,kFourByteCode)
  85. };
  86.  
  87. #if USESROUTINEDESCRIPTORS
  88. typedef pascal void (*MSAMIOCompletionProcPtr)(MSAMParam* paramBlock);
  89.  
  90. typedef UniversalProcPtr MSAMIOCompletionUPP;
  91.  
  92. #define CallMSAMIOCompletionProc(userRoutine, paramBlock)  \
  93.     CallUniversalProc((UniversalProcPtr)(userRoutine), uppMSAMIOCompletionProcInfo, (paramBlock))
  94.  
  95. #define NewMSAMIOCompletionProc(userRoutine)  \
  96.     (MSAMIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine),  \
  97.     uppMSAMIOCompletionProcInfo, GetCurrentISA())
  98.  
  99. #else
  100. typedef ProcPtr MSAMIOCompletionUPP;
  101.  
  102. #define NewMSAMIOCompletionProc(userRoutine)  \
  103.     (MSAMIOCompletionUPP)((userRoutine))
  104.  
  105. #endif
  106. #define MailParamBlockHeader                     \
  107.     Ptr                    qLink;                    \
  108.     long                reservedH1;                \
  109.     long                reservedH2;                \
  110.     MSAMIOCompletionUPP    ioCompletion;            \
  111.     OSErr                ioResult;                \
  112.     long                saveA5;                    \
  113.     short                reqCode;
  114.  
  115. typedef long MailMsgRef;                /* reference to a new or open letter or message */
  116.  
  117. typedef long MSAMQueueRef;            /* reference to an open msam queue */
  118. typedef unsigned short MSAMSlotID;    /* identifies slots managed by a PMSAM */
  119.  
  120. typedef long MailboxRef;                /* reference to an active mailbox */
  121. typedef unsigned short MailSlotID;        /* identifies slots within a mailbox */
  122.  
  123. /* identifies a letter in a mailbox */
  124. #if defined(powerc) || defined (__powerc)
  125. #pragma options align=mac68k
  126. #endif
  127. struct MailSeqNum {
  128.     MailSlotID                    slotID;
  129.     long                        seqNum;
  130. };
  131. #if defined(powerc) || defined(__powerc)
  132. #pragma options align=reset
  133. #endif
  134.  
  135. typedef struct MailSeqNum MailSeqNum;
  136.  
  137. /* A MailBuffer is used to describe a buffer used for an IO operation.
  138. The location of the buffer is pointed to by 'buffer'. 
  139. When reading, the size of the buffer is 'bufferSize' 
  140. and the size of data actually read is 'dataSize'.
  141. When writing, the size of data to be written is 'bufferSize' 
  142. and the size of data actually written is 'dataSize'.
  143. */
  144.  
  145. #if defined(powerc) || defined (__powerc)
  146. #pragma options align=mac68k
  147. #endif
  148. struct MailBuffer {
  149.     long                        bufferSize;
  150.     Ptr                            buffer;
  151.     long                        dataSize;
  152. };
  153. #if defined(powerc) || defined(__powerc)
  154. #pragma options align=reset
  155. #endif
  156.  
  157. typedef struct MailBuffer MailBuffer;
  158.  
  159. /* A MailReply is used to describe a commonly used reply buffer format.
  160. It contains a count of tuples followed by an array of tuples.
  161. The format of the tuple itself depends on each particular call.
  162. */
  163. #if defined(powerc) || defined (__powerc)
  164. #pragma options align=mac68k
  165. #endif
  166. struct MailReply {
  167.     unsigned short                tupleCount;
  168.     /* tuple[tupleCount] */        
  169. };
  170. #if defined(powerc) || defined(__powerc)
  171. #pragma options align=reset
  172. #endif
  173.  
  174. typedef struct MailReply MailReply;
  175.  
  176. /* Shared Memory Communication Area used when Mail Manager sends 
  177. High Level Events to a PMSAM. 
  178. */
  179. #if defined(powerc) || defined (__powerc)
  180. #pragma options align=mac68k
  181. #endif
  182. struct SMCA {
  183.     unsigned short                smcaLength;        /* includes size of smcaLength field */
  184.     OSErr                        result;
  185.     long                        userBytes;
  186.     union {
  187.         CreationID                    slotCID;        /* for create/modify/delete slot calls */
  188.         long                        msgHint;        /* for kMailEPPCMsgOpened */
  189.     }                            u;
  190. };
  191. #if defined(powerc) || defined(__powerc)
  192. #pragma options align=reset
  193. #endif
  194.  
  195. typedef struct SMCA SMCA;
  196.  
  197. /* Value of creator and types fields for messages and blocks defined by MailManager */
  198. #define kMailAppleMailCreator        'apml'        /* message and letter block creator */
  199.  
  200. #define kMailLtrMsgType                'lttr'        /* message type of letters, reports */
  201. #define kMailLtrHdrType                'lthd'        /* contains letter header */
  202. #define kMailContentType            'body'        /* contains content of letter */
  203. #define kMailEnclosureListType        'elst'        /* contains list of enclosures */
  204. #define kMailEnclosureDesktopType    'edsk'        /* contains desktop mgr info for enclosures */
  205.  
  206. #define kMailEnclosureFileType        'asgl'        /* contains a file enclosure */
  207. /* format is defined by AppleSingle */
  208.  
  209. #define kMailImageBodyType            'imag'        /* contains image of letter */
  210. /*        format is struct TPfPgDir - in Printing.h
  211.     *    struct TPfPgDir {
  212.     *        short    pageCount;        - number of pages in the image.
  213.     *        long    iPgPos[129];    - iPgPos[n] is the offset from the start of the block
  214.     *                                - to image of page n.
  215.     *                                - iPgPos[n+1] - iPgPos[n] is the length of page n.
  216. */
  217.  
  218. #define kMailMSAMType            'gwyi'        /* contains msam specific information */
  219.  
  220. #define kMailTunnelLtrType            'tunl'        /* used to read a tunnelled message */
  221. #define kMailHopInfoType            'hopi'        /* used to read hopInfo for a tunnelled message */
  222.  
  223. #define kMailReportType                'rpti'        /* contains report info */
  224. /*
  225. Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
  226. This block has a header, IPMReportBlockHeader,
  227. followed by an array of elements, each of type IPMRecipientReport
  228. */
  229.  
  230. /* Various families used by mail or related msgs */
  231. #define kMailFamily     'mail'    /* Defines family of "mail" msgs: content, header, etc */
  232. #define kMailFamilyFile 'file'    /* Defines family of "direct display" msgs */
  233.  
  234. typedef unsigned short MailAttributeID;
  235.  
  236. /* Values of MailAttributeID */
  237. /* Message store attributes - stored in the catalog */
  238. /* Will always be present in a letter and have fixed sizes */
  239. enum  {
  240.     kMailLetterFlagsBit        = 1,        /* MailLetterFlags */
  241.  
  242. /* Letter attributes - stored in the letter */
  243. /* Will always be present in a letter and have fixed sizes */
  244.     kMailIndicationsBit        = 3,        /* MailIndications */
  245.     kMailMsgTypeBit            = 4,        /* OCECreatorType */
  246.     kMailLetterIDBit        = 5,        /* MailLetterID */
  247.     kMailSendTimeStampBit    = 6,        /* MailTime */
  248.     kMailNestingLevelBit    = 7,        /* MailNestingLevel */
  249.     kMailMsgFamilyBit        = 8,        /* OSType */
  250.  
  251. /* Letter attributes - stored in the letter */
  252. /* May be present in a letter and have fixed sizes */
  253.     kMailReplyIDBit                = 9,    /* MailLetterID */
  254.     kMailConversationIDBit        = 10,    /* MailLetterID */
  255.  
  256. /* Letter attributes - stored in the letter */
  257. /* May be present in a letter and have variable length sizes */
  258.     kMailSubjectBit            = 11,        /* RString */
  259.     kMailFromBit            = 12,        /* MailRecipient */
  260.     kMailToBit                = 13,        /* MailRecipient */
  261.     kMailCcBit                = 14,        /* MailRecipient */
  262.     kMailBccBit                = 15        /* MailRecipient */
  263. };
  264.  
  265. typedef unsigned long MailAttributeMask;
  266.  
  267. /* Values of MailAttributeMask */
  268. enum  {
  269.     kMailLetterFlagsMask        = 1L << (kMailLetterFlagsBit - 1),
  270.     kMailIndicationsMask        = 1L << (kMailIndicationsBit - 1),
  271.     kMailMsgTypeMask            = 1L << (kMailMsgTypeBit - 1),
  272.     kMailLetterIDMask            = 1L << (kMailLetterIDBit - 1),
  273.     kMailSendTimeStampMask        = 1L << (kMailSendTimeStampBit - 1),
  274.     kMailNestingLevelMask        = 1L << (kMailNestingLevelBit - 1),
  275.     kMailMsgFamilyMask            = 1L << (kMailMsgFamilyBit - 1),
  276.     kMailReplyIDMask            = 1L << (kMailReplyIDBit - 1),
  277.     kMailConversationIDMask        = 1L << (kMailConversationIDBit - 1),
  278.     kMailSubjectMask            = 1L << (kMailSubjectBit - 1),
  279.     kMailFromMask                = 1L << (kMailFromBit - 1),
  280.     kMailToMask                    = 1L << (kMailToBit - 1),
  281.     kMailCcMask                    = 1L << (kMailCcBit - 1),
  282.     kMailBccMask                = 1L << (kMailBccBit - 1)
  283. };
  284.  
  285. typedef unsigned long MailAttributeBitmap;
  286.  
  287. typedef unsigned short MailLetterSystemFlags;
  288.  
  289. /* Values of MailLetterSystemFlags */
  290. enum  {
  291.     kMailIsLocalBit =2                    /* letter is available locally (either by nature or via cache) */
  292. };
  293.  
  294. enum  {
  295.     kMailIsLocalMask            = 1L << kMailIsLocalBit
  296. };
  297.  
  298. typedef unsigned short MailLetterUserFlags;
  299.  
  300. enum  {
  301.     kMailReadBit,                        /* this letter has been opened */
  302.     kMailDontArchiveBit,                /* this letter is not */
  303.                                         /* to be archived either because */
  304.                                         /* it has already been archived or */
  305.                                         /* it should not be archived. */
  306.     kMailInTrashBit                        /* this letter is in trash */
  307. };
  308.  
  309. /* Values of MailLetterUserFlags */
  310. enum  {
  311.     kMailReadMask                = 1L << kMailReadBit,
  312.     kMailDontArchiveMask        = 1L << kMailDontArchiveBit,
  313.     kMailInTrashMask            = 1L << kMailInTrashBit
  314. };
  315.  
  316. #if defined(powerc) || defined (__powerc)
  317. #pragma options align=mac68k
  318. #endif
  319. struct MailLetterFlags {
  320.     MailLetterSystemFlags        sysFlags;
  321.     MailLetterUserFlags            userFlags;
  322. };
  323. #if defined(powerc) || defined(__powerc)
  324. #pragma options align=reset
  325. #endif
  326.  
  327. typedef struct MailLetterFlags MailLetterFlags;
  328.  
  329. #if defined(powerc) || defined (__powerc)
  330. #pragma options align=mac68k
  331. #endif
  332. struct MailMaskedLetterFlags {
  333.     MailLetterFlags                flagMask;                /* flags that are to be set */
  334.     MailLetterFlags                flagValues;                /* and their values */
  335. };
  336. #if defined(powerc) || defined(__powerc)
  337. #pragma options align=reset
  338. #endif
  339.  
  340. typedef struct MailMaskedLetterFlags MailMaskedLetterFlags;
  341.  
  342. enum  {
  343.     kMailOriginalInReportBit    = 1,
  344.     kMailNonReceiptReportsBit    = 3,
  345.     kMailReceiptReportsBit        = 4,
  346.     kMailForwardedBit            = 5,
  347.     kMailPriorityBit            = 6,
  348.     kMailIsReportWithOriginalBit = 8,
  349.     kMailIsReportBit            = 9,
  350.     kMailHasContentBit            = 10,
  351.     kMailHasSignatureBit        = 11,
  352.     kMailAuthenticatedBit        = 12,
  353.     kMailSentBit                = 13
  354. };
  355.  
  356. /* Values of MailIndications */
  357. enum  {
  358.     kMailSentMask                = 1L << (kMailSentBit - 1),
  359.     kMailAuthenticatedMask        = 1L << (kMailAuthenticatedBit - 1),
  360.     kMailHasSignatureMask        = 1L << (kMailHasSignatureBit - 1),
  361.     kMailHasContentMask            = 1L << (kMailHasContentBit - 1),
  362.     kMailIsReportMask            = 1L << (kMailIsReportBit - 1),
  363.     kMailIsReportWithOriginalMask = 1L << (kMailIsReportWithOriginalBit - 1),
  364.     kMailPriorityMask            = 3L << (kMailPriorityBit - 1),
  365.     kMailForwardedMask            = 1L << (kMailForwardedBit - 1),
  366.     kMailReceiptReportsMask        = 1L << (kMailReceiptReportsBit - 1),
  367.     kMailNonReceiptReportsMask    = 1L << (kMailNonReceiptReportsBit - 1),
  368.     kMailOriginalInReportMask    = 3L << (kMailOriginalInReportBit - 1)
  369. };
  370.  
  371. typedef unsigned long MailIndications;
  372.  
  373. /* values of the field originalInReport in MailIndications */
  374. enum  {
  375.     kMailNoOriginal                = 0,        /* do not enclose original in reports */
  376.     kMailEncloseOnNonReceipt    = 3            /* enclose original in non-delivery reports */
  377. };
  378.  
  379. typedef IPMMsgID MailLetterID;
  380.  
  381. #if defined(powerc) || defined (__powerc)
  382. #pragma options align=mac68k
  383. #endif
  384. struct MailTime {
  385.     UTCTime                        time;                        /* current UTC(GMT) time */
  386.     UTCOffset                    offset;                        /* offset from GMT */
  387. };
  388. #if defined(powerc) || defined(__powerc)
  389. #pragma options align=reset
  390. #endif
  391.  
  392. typedef struct MailTime MailTime;
  393.  
  394. typedef unsigned short MailNestingLevel;    /* innermost letter has nestingLevel 0 */
  395.  
  396. typedef OCERecipient MailRecipient;
  397.  
  398. enum  {
  399.     kMailTextSegmentBit,
  400.     kMailPictSegmentBit,
  401.     kMailSoundSegmentBit,
  402.     kMailStyledTextSegmentBit,
  403.     kMailMovieSegmentBit
  404. };
  405.  
  406. typedef unsigned short MailSegmentMask;
  407.  
  408. /* Values of MailSegmentMask */
  409. enum  {
  410.     kMailTextSegmentMask        = 1L << kMailTextSegmentBit,
  411.     kMailPictSegmentMask        = 1L << kMailPictSegmentBit,
  412.     kMailSoundSegmentMask        = 1L << kMailSoundSegmentBit,
  413.     kMailStyledTextSegmentMask    = 1L << kMailStyledTextSegmentBit,
  414.     kMailMovieSegmentMask        = 1L << kMailMovieSegmentBit
  415. };
  416.  
  417. typedef unsigned short MailSegmentType;
  418.  
  419. /* Values of MailSegmentType */
  420. enum  {
  421.     kMailInvalidSegmentType        = 0,
  422.     kMailTextSegmentType        = 1,
  423.     kMailPictSegmentType        = 2,
  424.     kMailSoundSegmentType        = 3,
  425.     kMailStyledTextSegmentType    = 4,
  426.     kMailMovieSegmentType        = 5
  427. };
  428.  
  429. #define kMailErrorLogEntryVersion 0x101
  430.  
  431. #define kMailMSAMErrorStringListID        128    /* These 'STR#' resources should be */
  432. #define kMailMSAMActionStringListID        129    /* in the PMSAM resource fork */
  433.  
  434. typedef unsigned short MailLogErrorType;
  435.  
  436. /* Values of MailLogErrorType */
  437. enum  {
  438.     kMailELECorrectable            = 0,
  439.     kMailELEError                = 1,
  440.     kMailELEWarning                = 2,
  441.     kMailELEInformational        = 3
  442. };
  443.  
  444. typedef short MailLogErrorCode;
  445.  
  446. /* Values of MailLogErrorCode */
  447. enum  {
  448.                                                 /* positive codes are indices into */
  449.                                                 /* PMSAM defined strings */
  450.     kMailMSAMErrorCode            = 0,            
  451.     kMailMiscError                = -1,            /* negative codes are OCE defined */
  452.     kMailNoModem                = -2            /* modem required, but missing */
  453. };
  454.  
  455. #if defined(powerc) || defined (__powerc)
  456. #pragma options align=mac68k
  457. #endif
  458. /* < 128 bytes */
  459. struct MailErrorLogEntryInfo {
  460.     short                        version;
  461.     UTCTime                        timeOccurred;            /* do not fill in */
  462.     Str31                        reportingPMSAM;            /* do not fill in */
  463.     Str31                        reportingMSAMSlot;    /* do not fill in */
  464.     MailLogErrorType            errorType;
  465.     MailLogErrorCode            errorCode;
  466.     short                        errorResource;            /* resources are valid if */
  467.     short                        actionResource;            /* errorCode = kMailMSAMErrorCode */
  468.                                                         /* index starts from 1 */
  469.     unsigned long                filler;
  470.     unsigned short                filler2;
  471. };
  472. #if defined(powerc) || defined(__powerc)
  473. #pragma options align=reset
  474. #endif
  475.  
  476. typedef struct MailErrorLogEntryInfo MailErrorLogEntryInfo;
  477.  
  478. typedef short MailBlockMode;
  479.  
  480. /* Values of MailBlockMode */
  481. enum  {
  482.     kMailFromStart        = 1,            /* write data from offset calculated from */
  483.     kMailFromLEOB        = 2,            /* start of block, end of block, */
  484.     kMailFromMark        = 3                /* or from the current mark */
  485. };
  486.  
  487. #if defined(powerc) || defined (__powerc)
  488. #pragma options align=mac68k
  489. #endif
  490. struct MailEnclosureInfo {
  491.     StringPtr                    enclosureName;
  492.     CInfoPBPtr                    catInfo;
  493.     StringPtr                    comment;
  494.     Ptr                            icon;
  495. };
  496. #if defined(powerc) || defined(__powerc)
  497. #pragma options align=reset
  498. #endif
  499.  
  500. typedef struct MailEnclosureInfo MailEnclosureInfo;
  501.  
  502. enum  {
  503.     kOCESetupLocationNone = 0,            /* disconnect state */
  504.     kOCESetupLocationMax = 8            /* maximum location value */
  505. };
  506.  
  507. typedef char OCESetupLocation;
  508.  
  509. /* location state is a bitmask, 0x1=>1st location active, 
  510.  * 0x2 => 2nd, 0x4 => 3rd, etc.
  511.  */
  512. #define MailLocationMask(locationNumber) (1<<((locationNumber)-1))
  513. typedef unsigned char MailLocationFlags;
  514.  
  515. #if defined(powerc) || defined (__powerc)
  516. #pragma options align=mac68k
  517. #endif
  518. struct MailLocationInfo {
  519.     OCESetupLocation            location;
  520.     MailLocationFlags            active;
  521. };
  522. #if defined(powerc) || defined(__powerc)
  523. #pragma options align=reset
  524. #endif
  525.  
  526. typedef struct MailLocationInfo MailLocationInfo;
  527.  
  528. /**************************************************************************************/
  529. /* Definitions for Personal MSAMs */
  530. /**************************************************************************************/
  531.  
  532. #define kMailEPPCMsgVersion 3
  533.  
  534. #if defined(powerc) || defined (__powerc)
  535. #pragma options align=mac68k
  536. #endif
  537. struct MailEPPCMsg {
  538.     short                        version;
  539.     union {
  540.         SMCA                     *theSMCA;                /* for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn' */
  541.         long                    sequenceNumber;            /* for 'inqu', 'dlom' */
  542.         MailLocationInfo         locationInfo;            /* for 'locc' */
  543.     }                            u;
  544. };
  545. #if defined(powerc) || defined(__powerc)
  546. #pragma options align=reset
  547. #endif
  548.  
  549. typedef struct MailEPPCMsg MailEPPCMsg;
  550.  
  551. /* Values of OCE defined High Level Event message classes */
  552. enum  {
  553.     kMailEPPCCreateSlot            = 'crsl',
  554.     kMailEPPCModifySlot            = 'mdsl',
  555.     kMailEPPCDeleteSlot            = 'dlsl',
  556.     kMailEPPCShutDown            = 'quit',
  557.     kMailEPPCMailboxOpened        = 'mbop',
  558.     kMailEPPCMailboxClosed        = 'mbcl',
  559.     kMailEPPCMsgPending            = 'msgp',
  560.     kMailEPPCSendImmediate        = 'sndi',
  561.     kMailEPPCContinue            = 'cont',
  562.     kMailEPPCSchedule            = 'sked',
  563.     kMailEPPCAdmin                = 'admn',
  564.     kMailEPPCInQUpdate            = 'inqu',
  565.     kMailEPPCMsgOpened            = 'msgo',
  566.     kMailEPPCDeleteOutQMsg        = 'dlom',
  567.     kMailEPPCWakeup                = 'wkup',
  568.     kMailEPPCLocationChanged    = 'locc'
  569. };
  570.  
  571. #if defined(powerc) || defined (__powerc)
  572. #pragma options align=mac68k
  573. #endif
  574. union MailTimer {
  575.     long                frequency;        /* how often to connect */
  576.     long                connectTime;    /* time since midnight */
  577. };
  578. #if defined(powerc) || defined(__powerc)
  579. #pragma options align=reset
  580. #endif
  581.  
  582. typedef union MailTimer MailTimer;
  583.  
  584. enum  {
  585.     kMailTimerOff        = 0,            /* control is off */
  586.     kMailTimerTime        = 1,            /* specifies connect time (relative to midnight) */
  587.     kMailTimerFrequency    = 2                /* specifies connect frequency */
  588. };
  589.  
  590. typedef Byte MailTimerKind;
  591.  
  592. #if defined(powerc) || defined (__powerc)
  593. #pragma options align=mac68k
  594. #endif
  595. struct MailTimers {
  596.     MailTimerKind                sendTimeKind;        /* either kMailTimerTime or kMailTimerFrequency */
  597.     MailTimerKind                receiveTimeKind;    /* either kMailTimerTime or kMailTimerFrequency */
  598.     MailTimer                    send;
  599.     MailTimer                    receive;
  600. };
  601. #if defined(powerc) || defined(__powerc)
  602. #pragma options align=reset
  603. #endif
  604.  
  605. typedef struct MailTimers MailTimers;
  606.  
  607. #if defined(powerc) || defined (__powerc)
  608. #pragma options align=mac68k
  609. #endif
  610. struct MailStandardSlotInfoAttribute {
  611.     short                        version;
  612.     MailLocationFlags            active;                /* active if MailLocationMask(i) is set */
  613.     Byte                        padByte;
  614.     MailTimers                    sendReceiveTimer;
  615. };
  616. #if defined(powerc) || defined(__powerc)
  617. #pragma options align=reset
  618. #endif
  619.  
  620. typedef struct MailStandardSlotInfoAttribute MailStandardSlotInfoAttribute;
  621.  
  622. #if defined(powerc) || defined (__powerc)
  623. #pragma options align=mac68k
  624. #endif
  625. struct PMSAMGetMSAMRecordPB {
  626.     Ptr                            qLink;
  627.     long                        reservedH1;
  628.     long                        reservedH2;
  629.     MSAMIOCompletionUPP            ioCompletion;
  630.     OSErr                        ioResult;
  631.     long                        saveA5;
  632.     short                        reqCode;
  633.     CreationID                    msamCID;
  634. };
  635. #if defined(powerc) || defined(__powerc)
  636. #pragma options align=reset
  637. #endif
  638.  
  639. typedef struct PMSAMGetMSAMRecordPB PMSAMGetMSAMRecordPB;
  640.  
  641. #if defined(powerc) || defined (__powerc)
  642. #pragma options align=mac68k
  643. #endif
  644. struct PMSAMOpenQueuesPB {
  645.     Ptr                            qLink;
  646.     long                        reservedH1;
  647.     long                        reservedH2;
  648.     MSAMIOCompletionUPP            ioCompletion;
  649.     OSErr                        ioResult;
  650.     long                        saveA5;
  651.     short                        reqCode;
  652.     MSAMQueueRef                inQueueRef;
  653.     MSAMQueueRef                outQueueRef;
  654.     MSAMSlotID                    msamSlotID;
  655.     long                        filler[2];
  656. };
  657. #if defined(powerc) || defined(__powerc)
  658. #pragma options align=reset
  659. #endif
  660.  
  661. typedef struct PMSAMOpenQueuesPB PMSAMOpenQueuesPB;
  662.  
  663. typedef unsigned short PMSAMStatus;
  664.  
  665. /* Values of PMSAMStatus */
  666. enum  {
  667.     kPMSAMStatusPending    = 1,    /* for inQueue and outQueue */
  668.     kPMSAMStatusError    = 2,    /* for inQueue and outQueue */
  669.     kPMSAMStatusSending    = 3,    /* for outQueue only */
  670.     kPMSAMStatusCaching    = 4,    /* for inQueue only */
  671.     kPMSAMStatusSent    = 5        /* for outQueue only */
  672. };
  673.  
  674. #if defined(powerc) || defined (__powerc)
  675. #pragma options align=mac68k
  676. #endif
  677. struct PMSAMSetStatusPB {
  678.     Ptr                            qLink;
  679.     long                        reservedH1;
  680.     long                        reservedH2;
  681.     MSAMIOCompletionUPP            ioCompletion;
  682.     OSErr                        ioResult;
  683.     long                        saveA5;
  684.     short                        reqCode;
  685.     MSAMQueueRef                queueRef;
  686.     long                        seqNum;
  687.     long                        msgHint;    /* for posting cache error,set this to 0 when report outq status */
  688.     PMSAMStatus                    status;
  689. };
  690. #if defined(powerc) || defined(__powerc)
  691. #pragma options align=reset
  692. #endif
  693.  
  694. typedef struct PMSAMSetStatusPB PMSAMSetStatusPB;
  695.  
  696. #if defined(powerc) || defined (__powerc)
  697. #pragma options align=mac68k
  698. #endif
  699. struct PMSAMLogErrorPB {
  700.     Ptr                            qLink;
  701.     long                        reservedH1;
  702.     long                        reservedH2;
  703.     MSAMIOCompletionUPP            ioCompletion;
  704.     OSErr                        ioResult;
  705.     long                        saveA5;
  706.     short                        reqCode;
  707.     MSAMSlotID                    msamSlotID;        /* 0 for PMSAM errors */
  708.     MailErrorLogEntryInfo        *logEntry;
  709.     long                        filler[2];
  710. };
  711. #if defined(powerc) || defined(__powerc)
  712. #pragma options align=reset
  713. #endif
  714.  
  715. typedef struct PMSAMLogErrorPB PMSAMLogErrorPB;
  716.  
  717. #define kMailMsgSummaryVersion 1
  718.  
  719. #if defined(powerc) || defined (__powerc)
  720. #pragma options align=mac68k
  721. #endif
  722. struct MailMasterData {
  723.     MailAttributeBitmap            attrMask;        /* indicates attributes present in MsgSummary */
  724.     MailLetterID                messageID;
  725.     MailLetterID                replyID;
  726.     MailLetterID                conversationID;
  727. };
  728. #if defined(powerc) || defined(__powerc)
  729. #pragma options align=reset
  730. #endif
  731.  
  732. typedef struct MailMasterData MailMasterData;
  733.  
  734. #define kAddressedAs_TO 0x1
  735. #define kAddressedAs_CC 0x2
  736. #define kAddressedAs_BCC 0x4
  737.  
  738. #if defined(powerc) || defined (__powerc)
  739. #pragma options align=mac68k
  740. #endif
  741. struct MailCoreData {
  742.     MailLetterFlags                letterFlags;
  743.     unsigned long                messageSize;
  744.     MailIndications                letterIndications;
  745.     OCECreatorType                messageType;
  746.     MailTime                    sendTime;
  747.     OSType                        messageFamily;
  748.     unsigned char                reserved;
  749.     unsigned char                addressedToMe;
  750.     char                        agentInfo[6];    /* 6 bytes of special info [set to zero] */
  751.     /* these are variable length and even padded */
  752.     RString32                    sender;            /* recipient's entityName (trunc)*/
  753.     RString32                    subject;        /* subject maybe truncated */
  754. };
  755. #if defined(powerc) || defined(__powerc)
  756. #pragma options align=reset
  757. #endif
  758.  
  759. typedef struct MailCoreData MailCoreData;
  760.  
  761. #if defined(powerc) || defined (__powerc)
  762. #pragma options align=mac68k
  763. #endif
  764. struct MSAMMsgSummary {
  765.     short                        version;        /* following flags are defaulted by Toolbox */
  766.     Boolean                        msgDeleted;        /* true if msg is to be deleted by PMSAM */
  767.     Boolean                        msgUpdated;        /* true if msgSummary was updated by MailManager */
  768.     Boolean                        msgCached;        /* true if msg is in the slot's InQueue */
  769.     Byte                        padByte;
  770.     MailMasterData                masterData;
  771.     MailCoreData                coreData;
  772. };
  773. #if defined(powerc) || defined(__powerc)
  774. #pragma options align=reset
  775. #endif
  776.  
  777. typedef struct MSAMMsgSummary MSAMMsgSummary;
  778.  
  779. #define kMailMaxPMSAMMsgSummaryData 128    /* PMSAM can put up to 128 bytes of private msg summary data */
  780.  
  781. #if defined(powerc) || defined (__powerc)
  782. #pragma options align=mac68k
  783. #endif
  784. struct PMSAMCreateMsgSummaryPB {
  785.     Ptr                            qLink;
  786.     long                        reservedH1;
  787.     long                        reservedH2;
  788.     MSAMIOCompletionUPP            ioCompletion;
  789.     OSErr                        ioResult;
  790.     long                        saveA5;
  791.     short                        reqCode;
  792.     MSAMQueueRef                inQueueRef;
  793.     long                        seqNum;                /* <- seq of the new message */
  794.     MSAMMsgSummary                *msgSummary;        /* attributes and mask filled in */
  795.     MailBuffer                    *buffer;            /* PMSAM specific data to be appended */
  796. };
  797. #if defined(powerc) || defined(__powerc)
  798. #pragma options align=reset
  799. #endif
  800.  
  801. typedef struct PMSAMCreateMsgSummaryPB PMSAMCreateMsgSummaryPB;
  802.  
  803. #if defined(powerc) || defined (__powerc)
  804. #pragma options align=mac68k
  805. #endif
  806. struct PMSAMPutMsgSummaryPB {
  807.     Ptr                            qLink;
  808.     long                        reservedH1;
  809.     long                        reservedH2;
  810.     MSAMIOCompletionUPP            ioCompletion;
  811.     OSErr                        ioResult;
  812.     long                        saveA5;
  813.     short                        reqCode;
  814.     MSAMQueueRef                inQueueRef;
  815.     long                        seqNum;
  816.     MailMaskedLetterFlags        *letterFlags;    /* if not nil, then set msgStoreFlags */
  817.     MailBuffer                    *buffer;        /* PMSAM specific data to be overwritten */
  818. };
  819. #if defined(powerc) || defined(__powerc)
  820. #pragma options align=reset
  821. #endif
  822.  
  823. typedef struct PMSAMPutMsgSummaryPB PMSAMPutMsgSummaryPB;
  824.  
  825. #if defined(powerc) || defined (__powerc)
  826. #pragma options align=mac68k
  827. #endif
  828. struct PMSAMGetMsgSummaryPB {
  829.     Ptr                            qLink;
  830.     long                        reservedH1;
  831.     long                        reservedH2;
  832.     MSAMIOCompletionUPP            ioCompletion;
  833.     OSErr                        ioResult;
  834.     long                        saveA5;
  835.     short                        reqCode;
  836.     MSAMQueueRef                inQueueRef;
  837.     long                        seqNum;
  838.     MSAMMsgSummary                 *msgSummary;            /* if not nil, then read in the msgSummary */
  839.     MailBuffer                    *buffer;                /* PMSAM specific data to be read */
  840.     unsigned short                msgSummaryOffset;        /* offset of PMSAM specific data from start of MsgSummary */
  841. };
  842. #if defined(powerc) || defined(__powerc)
  843. #pragma options align=reset
  844. #endif
  845.  
  846. typedef struct PMSAMGetMsgSummaryPB PMSAMGetMsgSummaryPB;
  847.  
  848. /****************************************************************************************/
  849. /* Definitions for Server MSAMs */
  850. /**************************************************************************************/
  851.  
  852. typedef unsigned short SMSAMAdminCode;
  853.  
  854. /* Values of SMSAMAdminCode */
  855. enum  {
  856.     kSMSAMNotifyFwdrSetupChange    = 1,
  857.     kSMSAMNotifyFwdrNameChange    = 2,
  858.     kSMSAMNotifyFwdrPwdChange    = 3,
  859.     kSMSAMGetDynamicFwdrParams    = 4
  860. };
  861.  
  862. typedef unsigned long SMSAMSlotChanges;
  863.  
  864. enum  {
  865.     kSMSAMFwdrHomeInternetChangedBit,
  866.     kSMSAMFwdrConnectedToChangedBit,
  867.     kSMSAMFwdrForeignRLIsChangedBit,
  868.     kSMSAMFwdrMnMServerChangedBit
  869. };
  870.  
  871. /* Values of SMSAMSlotChanges */
  872. enum  {
  873.     kSMSAMFwdrEverythingChangedMask = -1,
  874.     kSMSAMFwdrHomeInternetChangedMask = 1L << kSMSAMFwdrHomeInternetChangedBit,
  875.     kSMSAMFwdrConnectedToChangedMask = 1L << kSMSAMFwdrConnectedToChangedBit,
  876.     kSMSAMFwdrForeignRLIsChangedMask = 1L << kSMSAMFwdrForeignRLIsChangedBit,
  877.     kSMSAMFwdrMnMServerChangedMask = 1L << kSMSAMFwdrMnMServerChangedBit
  878. };
  879.  
  880.  
  881. /* kSMSAMNotifyFwdrSetupChange */
  882. #if defined(powerc) || defined (__powerc)
  883. #pragma options align=mac68k
  884. #endif
  885. struct SMSAMSetupChange {
  886.     SMSAMSlotChanges    whatChanged;        /*  --> bitmap of what parameters changed */
  887.     AddrBlock            serverHint;            /*  --> try this ADAP server first */
  888. };
  889. #if defined(powerc) || defined(__powerc)
  890. #pragma options align=reset
  891. #endif
  892.  
  893. typedef struct SMSAMSetupChange SMSAMSetupChange;
  894.  
  895. /* kSMSAMNotifyFwdrNameChange */
  896. #if defined(powerc) || defined (__powerc)
  897. #pragma options align=mac68k
  898. #endif
  899. struct SMSAMNameChange {
  900.     RString                newName;        /*  --> msams new name */
  901.     AddrBlock            serverHint;        /*  --> try this ADAP server first */
  902. };
  903. #if defined(powerc) || defined(__powerc)
  904. #pragma options align=reset
  905. #endif
  906.  
  907. typedef struct SMSAMNameChange SMSAMNameChange;
  908.  
  909. /* kSMSAMNotifyFwdrPasswordChange */
  910. #if defined(powerc) || defined (__powerc)
  911. #pragma options align=mac68k
  912. #endif
  913. struct SMSAMPasswordChange {
  914.     RString                newPassword;    /*  --> msams new password */
  915.     AddrBlock            serverHint;        /*  --> try this ADAP server first */
  916. };
  917. #if defined(powerc) || defined(__powerc)
  918. #pragma options align=reset
  919. #endif
  920.  
  921. typedef struct SMSAMPasswordChange SMSAMPasswordChange;
  922.  
  923. /* kSMSAMGetDynamicFwdrParams */
  924. #if defined(powerc) || defined (__powerc)
  925. #pragma options align=mac68k
  926. #endif
  927. struct SMSAMDynamicParams {
  928.     unsigned long    curDiskUsed;        /* <--  amount of disk space used by msam */
  929.     unsigned long    curMemoryUsed;        /* <--  amount of memory used by msam */
  930. };
  931. #if defined(powerc) || defined(__powerc)
  932. #pragma options align=reset
  933. #endif
  934.  
  935. typedef struct SMSAMDynamicParams SMSAMDynamicParams;
  936.  
  937. #if defined(powerc) || defined (__powerc)
  938. #pragma options align=mac68k
  939. #endif
  940. struct SMSAMAdminEPPCRequest {
  941.     SMSAMAdminCode                adminCode;
  942.     union {
  943.         SMSAMSetupChange            setupChange;
  944.         SMSAMNameChange                nameChange;
  945.         SMSAMPasswordChange            passwordChange;
  946.         SMSAMDynamicParams            dynamicParams;
  947.     }                            u;
  948. };
  949. #if defined(powerc) || defined(__powerc)
  950. #pragma options align=reset
  951. #endif
  952.  
  953. typedef struct SMSAMAdminEPPCRequest SMSAMAdminEPPCRequest;
  954.  
  955. #if defined(powerc) || defined (__powerc)
  956. #pragma options align=mac68k
  957. #endif
  958. struct SMSAMSetupPB {
  959.     Ptr                            qLink;
  960.     long                        reservedH1;
  961.     long                        reservedH2;
  962.     MSAMIOCompletionUPP            ioCompletion;
  963.     OSErr                        ioResult;
  964.     long                        saveA5;
  965.     short                        reqCode;
  966.     RecordIDPtr                    serverMSAM;
  967.     RStringPtr                    password;
  968.     OSType                        gatewayType;
  969.     RStringPtr                    gatewayTypeDescription;
  970.     AddrBlock                    catalogServerHint;
  971. };
  972. #if defined(powerc) || defined(__powerc)
  973. #pragma options align=reset
  974. #endif
  975.  
  976. typedef struct SMSAMSetupPB SMSAMSetupPB;
  977.  
  978. #if defined(powerc) || defined (__powerc)
  979. #pragma options align=mac68k
  980. #endif
  981. struct SMSAMStartupPB {
  982.     Ptr                            qLink;
  983.     long                        reservedH1;
  984.     long                        reservedH2;
  985.     MSAMIOCompletionUPP            ioCompletion;
  986.     OSErr                        ioResult;
  987.     long                        saveA5;
  988.     short                        reqCode;
  989.     AuthIdentity                msamIdentity;
  990.     MSAMQueueRef                queueRef;
  991. };
  992. #if defined(powerc) || defined(__powerc)
  993. #pragma options align=reset
  994. #endif
  995.  
  996. typedef struct SMSAMStartupPB SMSAMStartupPB;
  997.  
  998. #if defined(powerc) || defined (__powerc)
  999. #pragma options align=mac68k
  1000. #endif
  1001. struct SMSAMShutdownPB {
  1002.     Ptr                            qLink;
  1003.     long                        reservedH1;
  1004.     long                        reservedH2;
  1005.     MSAMIOCompletionUPP            ioCompletion;
  1006.     OSErr                        ioResult;
  1007.     long                        saveA5;
  1008.     short                        reqCode;
  1009.     MSAMQueueRef                queueRef;
  1010. };
  1011. #if defined(powerc) || defined(__powerc)
  1012. #pragma options align=reset
  1013. #endif
  1014.  
  1015. typedef struct SMSAMShutdownPB SMSAMShutdownPB;
  1016.  
  1017. /****************************************************************************************/
  1018. /* Definitions for reading and writing MSAM Letters */
  1019. /****************************************************************************************/
  1020.  
  1021. #if defined(powerc) || defined (__powerc)
  1022. #pragma options align=mac68k
  1023. #endif
  1024. struct MSAMEnumeratePB {
  1025.     Ptr                            qLink;
  1026.     long                        reservedH1;
  1027.     long                        reservedH2;
  1028.     MSAMIOCompletionUPP            ioCompletion;
  1029.     OSErr                        ioResult;
  1030.     long                        saveA5;
  1031.     short                        reqCode;
  1032.     MSAMQueueRef                queueRef;
  1033.     long                        startSeqNum;
  1034.     long                        nextSeqNum;
  1035.     MailBuffer                    buffer;
  1036.     /* buffer contains a Mail Reply. Each tuple is a 
  1037.     MSAMEnumerateInQReply when enumerating the inQueue
  1038.     MSAMEnumerateOutQReply when enumerating the outQueue 
  1039.     */
  1040. };
  1041. #if defined(powerc) || defined(__powerc)
  1042. #pragma options align=reset
  1043. #endif
  1044.  
  1045. typedef struct MSAMEnumeratePB MSAMEnumeratePB;
  1046.  
  1047. #if defined(powerc) || defined (__powerc)
  1048. #pragma options align=mac68k
  1049. #endif
  1050. struct MSAMEnumerateInQReply {
  1051.     long                        seqNum;
  1052.     Boolean                        msgDeleted;        /* true if msg is to be deleted by PMSAM */
  1053.     Boolean                        msgUpdated;        /* true if MsgSummary has been updated by TB */
  1054.     Boolean                        msgCached;        /* true if msg is in the incoming queue */
  1055.     Byte                        padByte;
  1056. };
  1057. #if defined(powerc) || defined(__powerc)
  1058. #pragma options align=reset
  1059. #endif
  1060.  
  1061. typedef struct MSAMEnumerateInQReply MSAMEnumerateInQReply;
  1062.  
  1063. #if defined(powerc) || defined (__powerc)
  1064. #pragma options align=mac68k
  1065. #endif
  1066. struct MSAMEnumerateOutQReply {
  1067.     long                        seqNum;
  1068.     Boolean                        done;                /* true if all responsible recipients have been processed */
  1069.     IPMPriority                    priority;
  1070.     OSType                        msgFamily;
  1071.     long                        approxSize;
  1072.     Boolean                        tunnelForm;            /* true if this letter has to be tunnelled */
  1073.     Byte                        padByte;
  1074.     NetworkSpec                    nextHop;            /* valid if tunnelForm is true */
  1075.     OCECreatorType                msgType;
  1076. };
  1077. #if defined(powerc) || defined(__powerc)
  1078. #pragma options align=reset
  1079. #endif
  1080.  
  1081. typedef struct MSAMEnumerateOutQReply MSAMEnumerateOutQReply;
  1082.  
  1083. #if defined(powerc) || defined (__powerc)
  1084. #pragma options align=mac68k
  1085. #endif
  1086. struct MSAMDeletePB {
  1087.     Ptr                            qLink;
  1088.     long                        reservedH1;
  1089.     long                        reservedH2;
  1090.     MSAMIOCompletionUPP            ioCompletion;
  1091.     OSErr                        ioResult;
  1092.     long                        saveA5;
  1093.     short                        reqCode;
  1094.     MSAMQueueRef                queueRef;
  1095.     long                        seqNum;
  1096.     Boolean                        msgOnly;        /* only valid for PMSAM & inQueue */
  1097.                                                 /* set true to delete message but not msgSummary */
  1098.     Byte                        padByte;
  1099.     OSErr                        result;            /* only valid for SMSAM & tunnelled messages */
  1100. };
  1101. #if defined(powerc) || defined(__powerc)
  1102. #pragma options align=reset
  1103. #endif
  1104.  
  1105. typedef struct MSAMDeletePB MSAMDeletePB;
  1106.  
  1107. #if defined(powerc) || defined (__powerc)
  1108. #pragma options align=mac68k
  1109. #endif
  1110. struct MSAMOpenPB {
  1111.     Ptr                            qLink;
  1112.     long                        reservedH1;
  1113.     long                        reservedH2;
  1114.     MSAMIOCompletionUPP            ioCompletion;
  1115.     OSErr                        ioResult;
  1116.     long                        saveA5;
  1117.     short                        reqCode;
  1118.     MSAMQueueRef                queueRef;
  1119.     long                        seqNum;
  1120.     MailMsgRef                    mailMsgRef;
  1121. };
  1122. #if defined(powerc) || defined(__powerc)
  1123. #pragma options align=reset
  1124. #endif
  1125.  
  1126. typedef struct MSAMOpenPB MSAMOpenPB;
  1127.  
  1128. #if defined(powerc) || defined (__powerc)
  1129. #pragma options align=mac68k
  1130. #endif
  1131. struct MSAMOpenNestedPB {
  1132.     Ptr                            qLink;
  1133.     long                        reservedH1;
  1134.     long                        reservedH2;
  1135.     MSAMIOCompletionUPP            ioCompletion;
  1136.     OSErr                        ioResult;
  1137.     long                        saveA5;
  1138.     short                        reqCode;
  1139.     MailMsgRef                    mailMsgRef;
  1140.     MailMsgRef                    nestedRef;
  1141. };
  1142. #if defined(powerc) || defined(__powerc)
  1143. #pragma options align=reset
  1144. #endif
  1145.  
  1146. typedef struct MSAMOpenNestedPB MSAMOpenNestedPB;
  1147.  
  1148. #if defined(powerc) || defined (__powerc)
  1149. #pragma options align=mac68k
  1150. #endif
  1151. struct MSAMClosePB {
  1152.     Ptr                            qLink;
  1153.     long                        reservedH1;
  1154.     long                        reservedH2;
  1155.     MSAMIOCompletionUPP            ioCompletion;
  1156.     OSErr                        ioResult;
  1157.     long                        saveA5;
  1158.     short                        reqCode;
  1159.     MailMsgRef                    mailMsgRef;
  1160. };
  1161. #if defined(powerc) || defined(__powerc)
  1162. #pragma options align=reset
  1163. #endif
  1164.  
  1165. typedef struct MSAMClosePB MSAMClosePB;
  1166.  
  1167. #if defined(powerc) || defined (__powerc)
  1168. #pragma options align=mac68k
  1169. #endif
  1170. struct MSAMGetMsgHeaderPB {
  1171.     Ptr                            qLink;
  1172.     long                        reservedH1;
  1173.     long                        reservedH2;
  1174.     MSAMIOCompletionUPP            ioCompletion;
  1175.     OSErr                        ioResult;
  1176.     long                        saveA5;
  1177.     short                        reqCode;
  1178.     MailMsgRef                    mailMsgRef;
  1179.     IPMHeaderSelector            selector;
  1180.     unsigned long                offset;
  1181.     MailBuffer                    buffer;
  1182.     unsigned long                remaining;
  1183. };
  1184. #if defined(powerc) || defined(__powerc)
  1185. #pragma options align=reset
  1186. #endif
  1187.  
  1188. typedef struct MSAMGetMsgHeaderPB MSAMGetMsgHeaderPB;
  1189.  
  1190. #if defined(powerc) || defined (__powerc)
  1191. #pragma options align=mac68k
  1192. #endif
  1193. struct MSAMGetAttributesPB {
  1194.     Ptr                            qLink;
  1195.     long                        reservedH1;
  1196.     long                        reservedH2;
  1197.     MSAMIOCompletionUPP            ioCompletion;
  1198.     OSErr                        ioResult;
  1199.     long                        saveA5;
  1200.     short                        reqCode;
  1201.     MailMsgRef                    mailMsgRef;
  1202.     MailAttributeBitmap            requestMask;    /* kMailIndicationsBit thru kMailSubjectBit */
  1203.     MailBuffer                    buffer;
  1204.     /*    buffer returned will contain the attribute values of 
  1205.         the attributes indicated in responseMask, 
  1206.         from the attribute indicated by the least significant bit set
  1207.         to the attribute indicated by the most significant bit set.
  1208.         Note that recipients - from, to, cc, bcc cannot be read using
  1209.         this call. Use GetRecipients to read these.
  1210.     */
  1211.     MailAttributeBitmap            responseMask;
  1212.     Boolean                        more;
  1213. };
  1214. #if defined(powerc) || defined(__powerc)
  1215. #pragma options align=reset
  1216. #endif
  1217.  
  1218. typedef struct MSAMGetAttributesPB MSAMGetAttributesPB;
  1219.  
  1220. #define kMailResolvedList 0                /* attrID value to get resolved recipient list */
  1221.  
  1222. #if defined(powerc) || defined (__powerc)
  1223. #pragma options align=mac68k
  1224. #endif
  1225. struct MailOriginalRecipient {
  1226.     short                        index;
  1227.     /* Followed by OCEPackedRecipient */
  1228. };
  1229. #if defined(powerc) || defined(__powerc)
  1230. #pragma options align=reset
  1231. #endif
  1232.  
  1233. typedef struct MailOriginalRecipient MailOriginalRecipient;
  1234.  
  1235. #if defined(powerc) || defined (__powerc)
  1236. #pragma options align=mac68k
  1237. #endif
  1238. struct MailResolvedRecipient {
  1239.     short                        index;
  1240.     short                        recipientFlags;
  1241.     Boolean                        responsible;
  1242.     Byte                        padByte;
  1243.     /* Followed by OCEPackedRecipient */
  1244. };
  1245. #if defined(powerc) || defined(__powerc)
  1246. #pragma options align=reset
  1247. #endif
  1248.  
  1249. typedef struct MailResolvedRecipient MailResolvedRecipient;
  1250.  
  1251. #if defined(powerc) || defined (__powerc)
  1252. #pragma options align=mac68k
  1253. #endif
  1254. struct MSAMGetRecipientsPB {
  1255.     Ptr                            qLink;
  1256.     long                        reservedH1;
  1257.     long                        reservedH2;
  1258.     MSAMIOCompletionUPP            ioCompletion;
  1259.     OSErr                        ioResult;
  1260.     long                        saveA5;
  1261.     short                        reqCode;
  1262.     MailMsgRef                    mailMsgRef;
  1263.     MailAttributeID                attrID;            /* kMailFromBit thru kMailBccBit */
  1264.     unsigned short                startIndex;        /* starts at 1 */
  1265.     MailBuffer                    buffer;
  1266.     /*     buffer contains a Mail Reply. Each tuple is a
  1267.         MailOriginalRecipient if getting original recipients 
  1268.                                 ie the attrID is kMail[From, To, Cc, Bcc]Bit
  1269.         MailResolvedRecipient if getting resolved reicpients
  1270.                                 ie the attrID is kMailResolvedList
  1271.         Both tuples are word alligned. 
  1272.     */
  1273.     unsigned short                nextIndex;
  1274.     Boolean                        more;
  1275. };
  1276. #if defined(powerc) || defined(__powerc)
  1277. #pragma options align=reset
  1278. #endif
  1279.  
  1280. typedef struct MSAMGetRecipientsPB MSAMGetRecipientsPB;
  1281.  
  1282. #if defined(powerc) || defined (__powerc)
  1283. #pragma options align=mac68k
  1284. #endif
  1285. struct MSAMGetContentPB {
  1286.     Ptr                            qLink;
  1287.     long                        reservedH1;
  1288.     long                        reservedH2;
  1289.     MSAMIOCompletionUPP            ioCompletion;
  1290.     OSErr                        ioResult;
  1291.     long                        saveA5;
  1292.     short                        reqCode;
  1293.     MailMsgRef                    mailMsgRef;
  1294.     MailSegmentMask                segmentMask;
  1295.     MailBuffer                    buffer;
  1296.     StScrpRec                    *textScrap;
  1297.     ScriptCode                    script;
  1298.     MailSegmentType                segmentType;
  1299.     Boolean                        endOfScript;
  1300.     Boolean                        endOfSegment;
  1301.     Boolean                        endOfContent;
  1302.     long                        segmentLength;        /* NEW: <-  valid first call in a segment */
  1303.     long                        segmentID;            /* NEW: <-> identifier for this segment */
  1304. };
  1305. #if defined(powerc) || defined(__powerc)
  1306. #pragma options align=reset
  1307. #endif
  1308.  
  1309. typedef struct MSAMGetContentPB MSAMGetContentPB;
  1310.  
  1311. #if defined(powerc) || defined (__powerc)
  1312. #pragma options align=mac68k
  1313. #endif
  1314. struct MSAMGetEnclosurePB {
  1315.     Ptr                            qLink;
  1316.     long                        reservedH1;
  1317.     long                        reservedH2;
  1318.     MSAMIOCompletionUPP            ioCompletion;
  1319.     OSErr                        ioResult;
  1320.     long                        saveA5;
  1321.     short                        reqCode;
  1322.     MailMsgRef                    mailMsgRef;
  1323.     Boolean                        contentEnclosure;
  1324.     Byte                        padByte;
  1325.     MailBuffer                    buffer;
  1326.     Boolean                        endOfFile;
  1327.     Boolean                        endOfEnclosures;
  1328. };
  1329. #if defined(powerc) || defined(__powerc)
  1330. #pragma options align=reset
  1331. #endif
  1332.  
  1333. typedef struct MSAMGetEnclosurePB MSAMGetEnclosurePB;
  1334.  
  1335. #if defined(powerc) || defined (__powerc)
  1336. #pragma options align=mac68k
  1337. #endif
  1338. struct MailBlockInfo {
  1339.     OCECreatorType                blockType;
  1340.     unsigned long                offset;
  1341.     unsigned long                blockLength;
  1342. };
  1343. #if defined(powerc) || defined(__powerc)
  1344. #pragma options align=reset
  1345. #endif
  1346.  
  1347. typedef struct MailBlockInfo MailBlockInfo;
  1348.  
  1349. #if defined(powerc) || defined (__powerc)
  1350. #pragma options align=mac68k
  1351. #endif
  1352. struct MSAMEnumerateBlocksPB {
  1353.     Ptr                            qLink;
  1354.     long                        reservedH1;
  1355.     long                        reservedH2;
  1356.     MSAMIOCompletionUPP            ioCompletion;
  1357.     OSErr                        ioResult;
  1358.     long                        saveA5;
  1359.     short                        reqCode;
  1360.     MailMsgRef                    mailMsgRef;
  1361.     unsigned short                startIndex;        /* starts at 1 */
  1362.     MailBuffer                    buffer;            /*     buffer contains a Mail Reply. Each tuple is a MailBlockInfo */
  1363.     unsigned short                nextIndex;
  1364.     Boolean                        more;
  1365. };
  1366. #if defined(powerc) || defined(__powerc)
  1367. #pragma options align=reset
  1368. #endif
  1369.  
  1370. typedef struct MSAMEnumerateBlocksPB MSAMEnumerateBlocksPB;
  1371.  
  1372. #if defined(powerc) || defined (__powerc)
  1373. #pragma options align=mac68k
  1374. #endif
  1375. struct MSAMGetBlockPB {
  1376.     Ptr                            qLink;
  1377.     long                        reservedH1;
  1378.     long                        reservedH2;
  1379.     MSAMIOCompletionUPP            ioCompletion;
  1380.     OSErr                        ioResult;
  1381.     long                        saveA5;
  1382.     short                        reqCode;
  1383.     MailMsgRef                    mailMsgRef;
  1384.     OCECreatorType                blockType;
  1385.     unsigned short                blockIndex;
  1386.     MailBuffer                    buffer;
  1387.     unsigned long                dataOffset;
  1388.     Boolean                        endOfBlock;
  1389.     Byte                        padByte;
  1390.     unsigned long                remaining;
  1391. };
  1392. #if defined(powerc) || defined(__powerc)
  1393. #pragma options align=reset
  1394. #endif
  1395.  
  1396. typedef struct MSAMGetBlockPB MSAMGetBlockPB;
  1397.  
  1398. /* YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
  1399.  * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
  1400.  * REASONS.
  1401. */
  1402.  
  1403. #if defined(powerc) || defined (__powerc)
  1404. #pragma options align=mac68k
  1405. #endif
  1406. /* not valid for tunnel form letters */
  1407. struct MSAMMarkRecipientsPB {
  1408.     Ptr                            qLink;
  1409.     long                        reservedH1;
  1410.     long                        reservedH2;
  1411.     MSAMIOCompletionUPP            ioCompletion;
  1412.     OSErr                        ioResult;
  1413.     long                        saveA5;
  1414.     short                        reqCode;
  1415.     MSAMQueueRef                queueRef;
  1416.     long                        seqNum;
  1417.     MailBuffer                    buffer;
  1418.     /*     buffer contains a Mail Reply. Each tuple is an unsigned short,
  1419.         the index of a recipient to be marked. 
  1420.     */
  1421. };
  1422. #if defined(powerc) || defined(__powerc)
  1423. #pragma options align=reset
  1424. #endif
  1425.  
  1426. typedef struct MSAMMarkRecipientsPB MSAMMarkRecipientsPB;
  1427.  
  1428. /* 
  1429.  * same as MSAMMarkRecipients except it takes a mailMsgRef instead of 
  1430.  * queueRef, seqNum 
  1431. */
  1432.  
  1433. #if defined(powerc) || defined (__powerc)
  1434. #pragma options align=mac68k
  1435. #endif
  1436. struct MSAMnMarkRecipientsPB {
  1437.     Ptr                            qLink;
  1438.     long                        reservedH1;
  1439.     long                        reservedH2;
  1440.     MSAMIOCompletionUPP            ioCompletion;
  1441.     OSErr                        ioResult;
  1442.     long                        saveA5;
  1443.     short                        reqCode;
  1444.     MailMsgRef                    mailMsgRef;
  1445.     MailBuffer                    buffer;
  1446. };
  1447. #if defined(powerc) || defined(__powerc)
  1448. #pragma options align=reset
  1449. #endif
  1450.  
  1451. typedef struct MSAMnMarkRecipientsPB MSAMnMarkRecipientsPB;
  1452.  
  1453. #if defined(powerc) || defined (__powerc)
  1454. #pragma options align=mac68k
  1455. #endif
  1456. struct MSAMCreatePB {
  1457.     Ptr                            qLink;
  1458.     long                        reservedH1;
  1459.     long                        reservedH2;
  1460.     MSAMIOCompletionUPP            ioCompletion;
  1461.     OSErr                        ioResult;
  1462.     long                        saveA5;
  1463.     short                        reqCode;
  1464.     MSAMQueueRef                queueRef;
  1465.     Boolean                        asLetter;        /* indicate if we should create as letter or msg */
  1466.     IPMMsgType                    msgType;        /* up to application discretion: must be of IPMSenderTag */
  1467.                                                 /* kIPMOSFormatType for asLetter=true */
  1468.     long                        refCon;            /* for messages only */
  1469.     long                        seqNum;            /* set if creating message in the inQueue */
  1470.     Boolean                        tunnelForm;        /* if true tunnelForm else newForm */
  1471.     Boolean                        bccRecipients;    /* true if creating letter with bcc recipients */
  1472.     MailMsgRef                    newRef;
  1473. };
  1474. #if defined(powerc) || defined(__powerc)
  1475. #pragma options align=reset
  1476. #endif
  1477.  
  1478. typedef struct MSAMCreatePB MSAMCreatePB;
  1479.  
  1480. #if defined(powerc) || defined (__powerc)
  1481. #pragma options align=mac68k
  1482. #endif
  1483. struct MSAMBeginNestedPB {
  1484.     Ptr                            qLink;
  1485.     long                        reservedH1;
  1486.     long                        reservedH2;
  1487.     MSAMIOCompletionUPP            ioCompletion;
  1488.     OSErr                        ioResult;
  1489.     long                        saveA5;
  1490.     short                        reqCode;
  1491.     MailMsgRef                    mailMsgRef;
  1492.     long                        refCon;            /* for messages only */
  1493.     IPMMsgType                    msgType;
  1494. };
  1495. #if defined(powerc) || defined(__powerc)
  1496. #pragma options align=reset
  1497. #endif
  1498.  
  1499. typedef struct MSAMBeginNestedPB MSAMBeginNestedPB;
  1500.  
  1501. #if defined(powerc) || defined (__powerc)
  1502. #pragma options align=mac68k
  1503. #endif
  1504. struct MSAMEndNestedPB {
  1505.     Ptr                            qLink;
  1506.     long                        reservedH1;
  1507.     long                        reservedH2;
  1508.     MSAMIOCompletionUPP            ioCompletion;
  1509.     OSErr                        ioResult;
  1510.     long                        saveA5;
  1511.     short                        reqCode;
  1512.     MailMsgRef                    mailMsgRef;
  1513. };
  1514. #if defined(powerc) || defined(__powerc)
  1515. #pragma options align=reset
  1516. #endif
  1517.  
  1518. typedef struct MSAMEndNestedPB MSAMEndNestedPB;
  1519.  
  1520. #if defined(powerc) || defined (__powerc)
  1521. #pragma options align=mac68k
  1522. #endif
  1523. struct MSAMSubmitPB {
  1524.     Ptr                            qLink;
  1525.     long                        reservedH1;
  1526.     long                        reservedH2;
  1527.     MSAMIOCompletionUPP            ioCompletion;
  1528.     OSErr                        ioResult;
  1529.     long                        saveA5;
  1530.     short                        reqCode;
  1531.     MailMsgRef                    mailMsgRef;
  1532.     Boolean                        submitFlag;
  1533.     Byte                        padByte;
  1534.     MailLetterID                msgID;
  1535. };
  1536. #if defined(powerc) || defined(__powerc)
  1537. #pragma options align=reset
  1538. #endif
  1539.  
  1540. typedef struct MSAMSubmitPB MSAMSubmitPB;
  1541.  
  1542. #if defined(powerc) || defined (__powerc)
  1543. #pragma options align=mac68k
  1544. #endif
  1545. struct MSAMPutMsgHeaderPB {
  1546.     Ptr                            qLink;
  1547.     long                        reservedH1;
  1548.     long                        reservedH2;
  1549.     MSAMIOCompletionUPP            ioCompletion;
  1550.     OSErr                        ioResult;
  1551.     long                        saveA5;
  1552.     short                        reqCode;
  1553.     MailMsgRef                    mailMsgRef;
  1554.     OCERecipient                *replyQueue;
  1555.     IPMSender                    *sender;
  1556.     IPMNotificationType            deliveryNotification;
  1557.     IPMPriority                    priority;
  1558. };
  1559. #if defined(powerc) || defined(__powerc)
  1560. #pragma options align=reset
  1561. #endif
  1562.  
  1563. typedef struct MSAMPutMsgHeaderPB MSAMPutMsgHeaderPB;
  1564.  
  1565. #if defined(powerc) || defined (__powerc)
  1566. #pragma options align=mac68k
  1567. #endif
  1568. struct MSAMPutAttributePB {
  1569.     Ptr                            qLink;
  1570.     long                        reservedH1;
  1571.     long                        reservedH2;
  1572.     MSAMIOCompletionUPP            ioCompletion;
  1573.     OSErr                        ioResult;
  1574.     long                        saveA5;
  1575.     short                        reqCode;
  1576.     MailMsgRef                    mailMsgRef;
  1577.     MailAttributeID                attrID;            /* kMailIndicationsBit thru kMailSubjectBit */
  1578.     MailBuffer                    buffer;
  1579. };
  1580. #if defined(powerc) || defined(__powerc)
  1581. #pragma options align=reset
  1582. #endif
  1583.  
  1584. typedef struct MSAMPutAttributePB MSAMPutAttributePB;
  1585.  
  1586. #if defined(powerc) || defined (__powerc)
  1587. #pragma options align=mac68k
  1588. #endif
  1589. struct MSAMPutRecipientPB {
  1590.     Ptr                            qLink;
  1591.     long                        reservedH1;
  1592.     long                        reservedH2;
  1593.     MSAMIOCompletionUPP            ioCompletion;
  1594.     OSErr                        ioResult;
  1595.     long                        saveA5;
  1596.     short                        reqCode;
  1597.     MailMsgRef                    mailMsgRef;
  1598.     MailAttributeID                attrID;            /* kMailFromBit thru kMailBccBit */
  1599.     MailRecipient                *recipient;
  1600.     Boolean                        responsible;    /* valid for server and message msams only */
  1601. };
  1602. #if defined(powerc) || defined(__powerc)
  1603. #pragma options align=reset
  1604. #endif
  1605.  
  1606. typedef struct MSAMPutRecipientPB MSAMPutRecipientPB;
  1607.  
  1608. #if defined(powerc) || defined (__powerc)
  1609. #pragma options align=mac68k
  1610. #endif
  1611. struct MSAMPutContentPB {
  1612.     Ptr                            qLink;
  1613.     long                        reservedH1;
  1614.     long                        reservedH2;
  1615.     MSAMIOCompletionUPP            ioCompletion;
  1616.     OSErr                        ioResult;
  1617.     long                        saveA5;
  1618.     short                        reqCode;
  1619.     MailMsgRef                    mailMsgRef;
  1620.     MailSegmentType                segmentType;
  1621.     Boolean                        append;
  1622.     Byte                        padByte;
  1623.     MailBuffer                    buffer;
  1624.     StScrpRec                    *textScrap;
  1625.     Boolean                        startNewScript;
  1626.     ScriptCode                    script;        /* valid only if startNewScript is true */
  1627. };
  1628. #if defined(powerc) || defined(__powerc)
  1629. #pragma options align=reset
  1630. #endif
  1631.  
  1632. typedef struct MSAMPutContentPB MSAMPutContentPB;
  1633.  
  1634. #if defined(powerc) || defined (__powerc)
  1635. #pragma options align=mac68k
  1636. #endif
  1637. struct MSAMPutEnclosurePB {
  1638.     Ptr                            qLink;
  1639.     long                        reservedH1;
  1640.     long                        reservedH2;
  1641.     MSAMIOCompletionUPP            ioCompletion;
  1642.     OSErr                        ioResult;
  1643.     long                        saveA5;
  1644.     short                        reqCode;
  1645.     MailMsgRef                    mailMsgRef;
  1646.     Boolean                        contentEnclosure;
  1647.     Byte                        padByte;
  1648.     Boolean                        hfs;            /* true => in file system, false => in memory */
  1649.     Boolean                        append;
  1650.     MailBuffer                    buffer;            /* Unused if hfs == true */
  1651.     FSSpec                        enclosure;
  1652.     MailEnclosureInfo            addlInfo;
  1653. };
  1654. #if defined(powerc) || defined(__powerc)
  1655. #pragma options align=reset
  1656. #endif
  1657.  
  1658. typedef struct MSAMPutEnclosurePB MSAMPutEnclosurePB;
  1659.  
  1660. #if defined(powerc) || defined (__powerc)
  1661. #pragma options align=mac68k
  1662. #endif
  1663. struct MSAMPutBlockPB {
  1664.     Ptr                            qLink;
  1665.     long                        reservedH1;
  1666.     long                        reservedH2;
  1667.     MSAMIOCompletionUPP            ioCompletion;
  1668.     OSErr                        ioResult;
  1669.     long                        saveA5;
  1670.     short                        reqCode;
  1671.     MailMsgRef                    mailMsgRef;
  1672.     long                        refCon;            /* for messages only */
  1673.     OCECreatorType                blockType;
  1674.     Boolean                        append;
  1675.     MailBuffer                    buffer;
  1676.     MailBlockMode                mode;        /* if blockType is kMailTunnelLtrType or kMailHopInfoType */
  1677.                                             /* mode is assumed to be kMailFromMark */
  1678.     unsigned long                offset;
  1679. };
  1680. #if defined(powerc) || defined(__powerc)
  1681. #pragma options align=reset
  1682. #endif
  1683.  
  1684. typedef struct MSAMPutBlockPB MSAMPutBlockPB;
  1685.  
  1686. #if defined(powerc) || defined (__powerc)
  1687. #pragma options align=mac68k
  1688. #endif
  1689. struct MSAMCreateReportPB {
  1690.     Ptr                            qLink;
  1691.     long                        reservedH1;
  1692.     long                        reservedH2;
  1693.     MSAMIOCompletionUPP            ioCompletion;
  1694.     OSErr                        ioResult;
  1695.     long                        saveA5;
  1696.     short                        reqCode;
  1697.     MSAMQueueRef                queueRef;        /* to distinguish personal and server MSAMs */
  1698.     MailMsgRef                    mailMsgRef;
  1699.     MailLetterID                msgID;            /* kMailLetterIDBit of letter being reported upon */
  1700.     MailRecipient                *sender;        /* sender of the letter you are creating report on */
  1701. };
  1702. #if defined(powerc) || defined(__powerc)
  1703. #pragma options align=reset
  1704. #endif
  1705.  
  1706. typedef struct MSAMCreateReportPB MSAMCreateReportPB;
  1707.  
  1708. #if defined(powerc) || defined (__powerc)
  1709. #pragma options align=mac68k
  1710. #endif
  1711. struct MSAMPutRecipientReportPB {
  1712.     Ptr                            qLink;
  1713.     long                        reservedH1;
  1714.     long                        reservedH2;
  1715.     MSAMIOCompletionUPP            ioCompletion;
  1716.     OSErr                        ioResult;
  1717.     long                        saveA5;
  1718.     short                        reqCode;
  1719.     MailMsgRef                    mailMsgRef;
  1720.     short                        recipientIndex;    /* recipient index in the original letter */
  1721.     OSErr                        result;            /* result of sending the recipient */
  1722. };
  1723. #if defined(powerc) || defined(__powerc)
  1724. #pragma options align=reset
  1725. #endif
  1726.  
  1727. typedef struct MSAMPutRecipientReportPB MSAMPutRecipientReportPB;
  1728.  
  1729. #if defined(powerc) || defined (__powerc)
  1730. #pragma options align=mac68k
  1731. #endif
  1732. struct MailWakeupPMSAMPB {
  1733.     Ptr                            qLink;
  1734.     long                        reservedH1;
  1735.     long                        reservedH2;
  1736.     MSAMIOCompletionUPP            ioCompletion;
  1737.     OSErr                        ioResult;
  1738.     long                        saveA5;
  1739.     short                        reqCode;
  1740.     CreationID                    pmsamCID;
  1741.     MailSlotID                    mailSlotID;
  1742. };
  1743. #if defined(powerc) || defined(__powerc)
  1744. #pragma options align=reset
  1745. #endif
  1746.  
  1747. typedef struct MailWakeupPMSAMPB MailWakeupPMSAMPB;
  1748.  
  1749. #if defined(powerc) || defined (__powerc)
  1750. #pragma options align=mac68k
  1751. #endif
  1752. struct MailCreateMailSlotPB {
  1753.     Ptr                            qLink;
  1754.     long                        reservedH1;
  1755.     long                        reservedH2;
  1756.     MSAMIOCompletionUPP            ioCompletion;
  1757.     OSErr                        ioResult;
  1758.     long                        saveA5;
  1759.     short                        reqCode;
  1760.     MailboxRef                    mailboxRef;
  1761.     long                        timeout;
  1762.     CreationID                    pmsamCID;
  1763.     SMCA                        smca;
  1764. };
  1765. #if defined(powerc) || defined(__powerc)
  1766. #pragma options align=reset
  1767. #endif
  1768.  
  1769. typedef struct MailCreateMailSlotPB MailCreateMailSlotPB;
  1770.  
  1771. #if defined(powerc) || defined (__powerc)
  1772. #pragma options align=mac68k
  1773. #endif
  1774. struct MailModifyMailSlotPB {
  1775.     Ptr                            qLink;
  1776.     long                        reservedH1;
  1777.     long                        reservedH2;
  1778.     MSAMIOCompletionUPP            ioCompletion;
  1779.     OSErr                        ioResult;
  1780.     long                        saveA5;
  1781.     short                        reqCode;
  1782.     MailboxRef                    mailboxRef;
  1783.     long                        timeout;
  1784.     CreationID                    pmsamCID;
  1785.     SMCA                        smca;
  1786. };
  1787. #if defined(powerc) || defined(__powerc)
  1788. #pragma options align=reset
  1789. #endif
  1790.  
  1791. typedef struct MailModifyMailSlotPB MailModifyMailSlotPB;
  1792.  
  1793. #define kPMSAMGetMSAMRecord 1286
  1794. #define kPMSAMOpenQueues 1280
  1795. #define kPMSAMLogError 1313
  1796. #define kPMSAMSetStatus 1319
  1797. #define kPMSAMCreateMsgSummary 1314
  1798. #define kPMSAMPutMsgSummary 1317
  1799. #define kPMSAMGetMsgSummary 1318
  1800. #define kMailWakeupPMSAM 1287
  1801. #define kSMSAMSetup 1315
  1802. #define kSMSAMStartup 1281
  1803. #define kSMSAMShutdown 1282
  1804. #define kMSAMEnumerate 1283
  1805. #define kMSAMDelete 1284
  1806. #define kMSAMOpen 1288
  1807. #define kMSAMOpenNested 1289
  1808. #define kMSAMClose 1290
  1809. #define kMSAMGetMsgHeader 1297
  1810. #define kMSAMnMarkRecipients 1298
  1811. #define kMSAMGetAttributes 1291
  1812. #define kMSAMGetRecipients 1292
  1813. #define kMSAMGetContent 1293
  1814. #define kMSAMGetEnclosure 1294
  1815. #define kMSAMEnumerateBlocks 1295
  1816. #define kMSAMGetBlock 1296
  1817. #define kMSAMMarkRecipients 1285
  1818. #define kMSAMCreate 1300
  1819. #define kMSAMBeginNested 1301
  1820. #define kMSAMEndNested 1302
  1821. #define kMSAMSubmit 1303
  1822. #define kMSAMPutMsgHeader 1309
  1823. #define kMSAMPutAttribute 1304
  1824. #define kMSAMPutRecipient 1305
  1825. #define kMSAMPutContent 1306
  1826. #define kMSAMPutEnclosure 1307
  1827. #define kMSAMPutBlock 1308
  1828. #define kMSAMCreateReport 1311
  1829. #define kMSAMPutRecipientReport 1312
  1830. #define kMailCreateMailSlot 1323
  1831. #define kMailModifyMailSlot 1324
  1832.  
  1833. #if defined(powerc) || defined (__powerc)
  1834. #pragma options align=mac68k
  1835. #endif
  1836. union MSAMParam {
  1837.     struct {
  1838.         Ptr                            qLink;
  1839.         long                        reservedH1;
  1840.         long                        reservedH2;
  1841.         MSAMIOCompletionUPP            ioCompletion;
  1842.         OSErr                        ioResult;
  1843.         long                        saveA5;
  1844.         short                        reqCode;
  1845.     }                            header;
  1846.     PMSAMGetMSAMRecordPB        pmsamGetMSAMRecord;
  1847.     PMSAMOpenQueuesPB            pmsamOpenQueues;
  1848.     PMSAMSetStatusPB            pmsamSetStatus;
  1849.     PMSAMLogErrorPB                pmsamLogError;
  1850.     SMSAMSetupPB                smsamSetup;
  1851.     SMSAMStartupPB                smsamStartup;
  1852.     SMSAMShutdownPB                smsamShutdown;
  1853.     MSAMEnumeratePB                msamEnumerate;
  1854.     MSAMDeletePB                msamDelete;
  1855.     MSAMOpenPB                    msamOpen;
  1856.     MSAMOpenNestedPB            msamOpenNested;
  1857.     MSAMClosePB                    msamClose;
  1858.     MSAMGetMsgHeaderPB            msamGetMsgHeader;
  1859.     MSAMGetAttributesPB            msamGetAttributes;
  1860.     MSAMGetRecipientsPB            msamGetRecipients;
  1861.     MSAMGetContentPB            msamGetContent;
  1862.     MSAMGetEnclosurePB            msamGetEnclosure;
  1863.     MSAMEnumerateBlocksPB        msamEnumerateBlocks;
  1864.     MSAMGetBlockPB                msamGetBlock;
  1865.     MSAMMarkRecipientsPB        msamMarkRecipients;
  1866.     MSAMnMarkRecipientsPB        msamnMarkRecipients;
  1867.     MSAMCreatePB                msamCreate;
  1868.     MSAMBeginNestedPB            msamBeginNested;
  1869.     MSAMEndNestedPB                msamEndNested;
  1870.     MSAMSubmitPB                msamSubmit;
  1871.     MSAMPutMsgHeaderPB            msamPutMsgHeader;
  1872.     MSAMPutAttributePB            msamPutAttribute;
  1873.     MSAMPutRecipientPB            msamPutRecipient;
  1874.     MSAMPutContentPB            msamPutContent;
  1875.     MSAMPutEnclosurePB            msamPutEnclosure;
  1876.     MSAMPutBlockPB                msamPutBlock;
  1877.     MSAMCreateReportPB            msamCreateReport;
  1878.     MSAMPutRecipientReportPB    msamPutRecipientReport;
  1879.     PMSAMCreateMsgSummaryPB        pmsamCreateMsgSummary;
  1880.     PMSAMPutMsgSummaryPB        pmsamPutMsgSummary;
  1881.     PMSAMGetMsgSummaryPB        pmsamGetMsgSummary;
  1882.     MailWakeupPMSAMPB            wakeupPMSAM;
  1883.     MailCreateMailSlotPB        createMailSlot;
  1884.     MailModifyMailSlotPB        modifyMailSlot;
  1885. };
  1886. #if defined(powerc) || defined(__powerc)
  1887. #pragma options align=reset
  1888. #endif
  1889.  
  1890.  
  1891. #ifdef __cplusplus
  1892. extern "C" {
  1893. #endif
  1894.  
  1895. extern pascal OSErr MailCreateMailSlot(MSAMParam *paramBlock)
  1896.  FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1323, 0xAA5E);
  1897. extern pascal OSErr MailModifyMailSlot(MSAMParam *paramBlock)
  1898.  FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1324, 0xAA5E);
  1899. extern pascal OSErr MailWakeupPMSAM(MSAMParam *paramBlock)
  1900.  FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1287, 0xAA5E);
  1901. extern pascal OSErr PMSAMOpenQueues(MSAMParam *paramBlock)
  1902.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1280, 0xAA5E);
  1903. extern pascal OSErr PMSAMSetStatus(MSAMParam *paramBlock, Boolean asyncFlag)
  1904.  THREEWORDINLINE(0x3f3c, 1319, 0xAA5E);
  1905. extern pascal OSErr PMSAMGetMSAMRecord(MSAMParam *paramBlock)
  1906.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1286, 0xAA5E);
  1907. extern pascal OSErr SMSAMSetup(MSAMParam *paramBlock)
  1908.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1315, 0xAA5E);
  1909. extern pascal OSErr SMSAMStartup(MSAMParam *paramBlock)
  1910.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1281, 0xAA5E);
  1911. extern pascal OSErr SMSAMShutdown(MSAMParam *paramBlock, Boolean asyncFlag)
  1912.  THREEWORDINLINE(0x3f3c, 1282, 0xAA5E);
  1913. extern pascal OSErr MSAMEnumerate(MSAMParam *paramBlock, Boolean asyncFlag)
  1914.  THREEWORDINLINE(0x3f3c, 1283, 0xAA5E);
  1915. extern pascal OSErr MSAMDelete(MSAMParam *paramBlock, Boolean asyncFlag)
  1916.  THREEWORDINLINE(0x3f3c, 1284, 0xAA5E);
  1917. extern pascal OSErr MSAMMarkRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
  1918.  THREEWORDINLINE(0x3f3c, 1285, 0xAA5E);
  1919. extern pascal OSErr MSAMnMarkRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
  1920.  THREEWORDINLINE(0x3f3c, 1298, 0xAA5E);
  1921. extern pascal OSErr MSAMOpen(MSAMParam *paramBlock, Boolean asyncFlag)
  1922.  THREEWORDINLINE(0x3f3c, 1288, 0xAA5E);
  1923. extern pascal OSErr MSAMOpenNested(MSAMParam *paramBlock, Boolean asyncFlag)
  1924.  THREEWORDINLINE(0x3f3c, 1289, 0xAA5E);
  1925. extern pascal OSErr MSAMClose(MSAMParam *paramBlock, Boolean asyncFlag)
  1926.  THREEWORDINLINE(0x3f3c, 1290, 0xAA5E);
  1927. extern pascal OSErr MSAMGetRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
  1928.  THREEWORDINLINE(0x3f3c, 1292, 0xAA5E);
  1929. extern pascal OSErr MSAMGetAttributes(MSAMParam *paramBlock, Boolean asyncFlag)
  1930.  THREEWORDINLINE(0x3f3c, 1291, 0xAA5E);
  1931. extern pascal OSErr MSAMGetContent(MSAMParam *paramBlock, Boolean asyncFlag)
  1932.  THREEWORDINLINE(0x3f3c, 1293, 0xAA5E);
  1933. extern pascal OSErr MSAMGetEnclosure(MSAMParam *paramBlock, Boolean asyncFlag)
  1934.  THREEWORDINLINE(0x3f3c, 1294, 0xAA5E);
  1935. extern pascal OSErr MSAMEnumerateBlocks(MSAMParam *paramBlock, Boolean asyncFlag)
  1936.  THREEWORDINLINE(0x3f3c, 1295, 0xAA5E);
  1937. extern pascal OSErr MSAMGetBlock(MSAMParam *paramBlock, Boolean asyncFlag)
  1938.  THREEWORDINLINE(0x3f3c, 1296, 0xAA5E);
  1939. extern pascal OSErr MSAMGetMsgHeader(MSAMParam *paramBlock, Boolean asyncFlag)
  1940.  THREEWORDINLINE(0x3f3c, 1297, 0xAA5E);
  1941. extern pascal OSErr MSAMCreate(MSAMParam *paramBlock, Boolean asyncFlag)
  1942.  THREEWORDINLINE(0x3f3c, 1300, 0xAA5E);
  1943. extern pascal OSErr MSAMBeginNested(MSAMParam *paramBlock, Boolean asyncFlag)
  1944.  THREEWORDINLINE(0x3f3c, 1301, 0xAA5E);
  1945. extern pascal OSErr MSAMEndNested(MSAMParam *paramBlock)
  1946.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1302, 0xAA5E);
  1947. extern pascal OSErr MSAMSubmit(MSAMParam *paramBlock)
  1948.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1303, 0xAA5E);
  1949. extern pascal OSErr MSAMPutAttribute(MSAMParam *paramBlock, Boolean asyncFlag)
  1950.  THREEWORDINLINE(0x3f3c, 1304, 0xAA5E);
  1951. extern pascal OSErr MSAMPutRecipient(MSAMParam *paramBlock, Boolean asyncFlag)
  1952.  THREEWORDINLINE(0x3f3c, 1305, 0xAA5E);
  1953. extern pascal OSErr MSAMPutContent(MSAMParam *paramBlock, Boolean asyncFlag)
  1954.  THREEWORDINLINE(0x3f3c, 1306, 0xAA5E);
  1955. extern pascal OSErr MSAMPutEnclosure(MSAMParam *paramBlock)
  1956.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1307, 0xAA5E);
  1957. extern pascal OSErr MSAMPutBlock(MSAMParam *paramBlock, Boolean asyncFlag)
  1958.  THREEWORDINLINE(0x3f3c, 1308, 0xAA5E);
  1959. extern pascal OSErr MSAMPutMsgHeader(MSAMParam *paramBlock, Boolean asyncFlag)
  1960.  THREEWORDINLINE(0x3f3c, 1309, 0xAA5E);
  1961. extern pascal OSErr MSAMCreateReport(MSAMParam *paramBlock, Boolean asyncFlag)
  1962.  THREEWORDINLINE(0x3f3c, 1311, 0xAA5E);
  1963. extern pascal OSErr MSAMPutRecipientReport(MSAMParam *paramBlock, Boolean asyncFlag)
  1964.  THREEWORDINLINE(0x3f3c, 1312, 0xAA5E);
  1965. extern pascal OSErr PMSAMLogError(MSAMParam *paramBlock)
  1966.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1313, 0xAA5E);
  1967. extern pascal OSErr PMSAMCreateMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
  1968.  THREEWORDINLINE(0x3f3c, 1314, 0xAA5E);
  1969. extern pascal OSErr PMSAMPutMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
  1970.  THREEWORDINLINE(0x3f3c, 1317, 0xAA5E);
  1971. extern pascal OSErr PMSAMGetMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
  1972.  THREEWORDINLINE(0x3f3c, 1318, 0xAA5E);
  1973. #ifdef __cplusplus
  1974. }
  1975. #endif
  1976.  
  1977. #endif
  1978.  
  1979.